package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class OrderBackStorage {
    private String id;

    private String backStorageCode;

    private String backStorageType;

    private String backUnit;

    private String backCount;

    private String backStorageStatus;

    private String remark;

    private String orderBackId;

    private String backUser;

    private String status;

    private Date createTime;

    private Date updateTime;

    private List<OrderBackStorageRelate> relates;

    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "待入库", "1", "已入库");

    public static final transient Map<String, String> TYPESTATUSMAP =
            ImmutableMap.of("1", "退货");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getBackStorageCode() {
        return backStorageCode;
    }

    public void setBackStorageCode(String backStorageCode) {
        this.backStorageCode = backStorageCode == null ? null : backStorageCode.trim();
    }

    public String getBackStorageTypeCn() {
        return TYPESTATUSMAP.get(getBackStorageType());
    }
    public String getBackStorageType() {
        return backStorageType;
    }

    public void setBackStorageType(String backStorageType) {
        this.backStorageType = backStorageType == null ? null : backStorageType.trim();
    }

    public String getBackUnit() {
        return backUnit;
    }

    public void setBackUnit(String backUnit) {
        this.backUnit = backUnit == null ? null : backUnit.trim();
    }

    public String getBackCount() {
        return backCount;
    }

    public void setBackCount(String backCount) {
        this.backCount = backCount == null ? null : backCount.trim();
    }

    public String getBackStorageStatusCn() {
        return STATUSMAP.get(getBackStorageStatus());
    }
    public String getBackStorageStatus() {
        return backStorageStatus;
    }

    public void setBackStorageStatus(String backStorageStatus) {
        this.backStorageStatus = backStorageStatus == null ? null : backStorageStatus.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getOrderBackId() {
        return orderBackId;
    }

    public void setOrderBackId(String orderBackId) {
        this.orderBackId = orderBackId == null ? null : orderBackId.trim();
    }

    public String getBackUser() {
        return backUser;
    }

    public void setBackUser(String backUser) {
        this.backUser = backUser == null ? null : backUser.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public List<OrderBackStorageRelate> getRelates() {
        return relates;
    }

    public void setRelates(List<OrderBackStorageRelate> relates) {
        this.relates = relates;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}